import request from '../request.js'

const api = {

  //歌单分类
  playListCat () {
    return request({ url: '/music/catList', method: 'get' })
  },
  //歌单
  playList (name, current, limit) {
    return request({ url: '/music/playList?limit=' + limit + '&current=' + current + '&cat=' + name, method: 'get' })
  },
  //歌单歌曲
  playSongList (playId) {
    return request({ url: '/music/playSongList?playId=' + playId, method: 'get' })
  },
  //获取歌曲信息
  songInfo (songId) {
    return request({ url: '/music/songInfo?songId=' + songId, method: 'get' })
  },
  //获取歌曲评论
  songComment (songId) {
    return request({ url: '/music/songComment?songId=' + songId, method: 'get' })
  },
  //热搜推荐
  searchHot () {
    return request({ url: '/music/searchHot', method: 'get' })
  },
  //搜索
  search (limit, current, keyword) {
    return request({
      url: '/music/search',
      method: 'post',
      data: {
        size: limit,
        current: current,
        search: keyword
      }
    })
  },
  //每日推荐
  recommend () {
    return request({ url: '/music/recommend', method: 'get' })
  },
  //视频信息
  moveInfo (mvId) {
    return request({ url: '/music/moveInfo?mvId=' + mvId, method: 'get' })
  }

}

export default api